<template>
	<view class="warp">
		<view class="warp">
			<view class="uni-margin-wrap">
				<view class="notice-list-body">
					<view class="uni-list">
						<block v-for="(value, index) in list" :key="index">
							<view class="uni-list-cell" hover-class="uni-list-cell-hover" @click="goDetail(value)">
								<view class="uni-media-list">
									<image class="uni-media-list-logo" :src="value.logo.length > 0 ? value.logo : '/static/image/pic_errer.png'"></image>
		
									<view class="uni-media-list-body">
										<view class="uni-media-list-text-top">
											<text class="text">{{ value.name }}</text>
											<image class="image" src="../../../static/home/home_auth.png"></image>
											<text class="text2">已认证</text>
										</view>
										<view class="uni-media-list-text-top">
											<text class="text2">地址:{{ value.address }}</text>
										</view>
										<view class="uni-media-list-text-bottom">
											<scroll-view class="scroll-view_H" scroll-x="true">
												<block v-for="(item, tIndex) in value.trace_zd" :key="tIndex">
													<view class="scroll-view-item_H">
														<view class="scroll-view-item-back-view">
															<text class="text">{{ item.origin }} > {{ item.destination }}</text>
														</view>
													</view>
												</block>
											</scroll-view>
										</view>
									</view>
								</view>
							</view>
						</block>
					</view>
				</view>
			</view>
		</view>
		 <view v-if="list.length == 0 "><ns-empty :isIndex="false" text="暂无物流公司"></ns-empty></view>
	</view>
</template>

<script>
export default {
	mixins: [],
	data() {
		return {
			list: [],
		};
	},
	
	onLoad(option) {
		this.getData();
	},
	methods: {
		goDetail(e){
		  this.$util.redirectTo('/pages/home/search/company-detail/company-detail', { logistics_id: e.id });
		}, 
		getData() {	
			this.http.sendRequest({
				api: this.api.mine.mineGetOftenLogisticsApi,
				data: {},
				success: res => {
					if (res.success == 'true' && res.data) {
						this.list = res.data.list;
					}
				}
			});
		},
	}
};
</script>

<style lang="scss">
@import '../public/css/wlCompany.scss';
</style>
